<template>
	<Modal v-model="isshow" :title="title" @on-ok="onOk" @on-cancel="onCancel">
		<slot :main="options" name="content">
			<Button type="default">这里是默认的内容</Button>
		</slot>
		<slot name="footer">
			<Button type="default">这里是默认的底部</Button>
		</slot>
	</Modal>
</template>
<script>
export default {
	props: ['title'],
	data() {
		return {
			isshow: false,
			options: {}
		}
	},
	methods: {
		show(options) {
			this.options = options;
			this.isshow = true;
		},
		hide() {
			this.isshow = false;
		},
		onOk() {
			this.options.onOk('onOk');
		},
		onCancel() {
			this.options.onCancel('onCancel');
		}
	}
}
</script>
<style lang="scss" scoped></style>